package acm.蓝桥17;

import java.util.Arrays;
import java.util.Scanner;

public class B飞机降落 {
    static int maxN=11,maxT= (int) 1e5+1;
    static int n;
    static int[][] arr=new int[maxN][4];    //0位置起点，1位置待机时间，2位置下降时间，3位置最迟落地时间
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int t=sc.nextInt();
        while (t-- > 0) {
            n=sc.nextInt();
            for (int i = 0; i < n; i++) {
                arr[i][0]=sc.nextInt();
                arr[i][1]=sc.nextInt();
                arr[i][2]=sc.nextInt();
                arr[i][3]=arr[i][0]+arr[i][1]+arr[i][2];
            }
            if (check(n)) {
                System.out.println("YES");
            }else {
                System.out.println("NO");
            }
        }
    }
    public static boolean check(int n){
        Arrays.sort(arr,0,n,(a,b)->a[3]-b[3]);
        int time=0;
        for (int i = 0; i < n; i++) {
            int[] cur=arr[i];
            int ddl = cur[0] + cur[1];
            if (ddl < time) return false;
            time = Math.max(time, cur[0]) + cur[2];
        }
        return true;
    }
}
